#!/usr/bin/python
inf = "load.inp"
outf = "userdef.h"
ofile = open(outf, 'w')
file_obj = open(inf, 'r')
ofile.writelines("#ifndef __User\n")
ofile.writelines("#define __User\n")
ofile.writelines("#include \"physicalconstants.h\"\n")
for line in file_obj:
    if line != '' and '=' in line:
        print "setting ", line
        var = line.split('=')
        ofile.writelines("#define " + var[0] + " " + var[-1])
ofile.writelines("#endif")
file_obj.close()
ofile.close()
